package com.zoweunion.mechanic.service.app.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zoweunion.mechanic.dao.app.TSSsHumanfaceDao;
import com.zoweunion.mechanic.service.app.TSSsHumanfaceService;
import com.zoweunion.mechanic.util.Orgin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;

import com.zoweunion.mechanic.entity.TSSsHumanfaceEntity;



@Service("tSSsHumanfaceService")
public class TSSsHumanfaceServiceImpl  implements TSSsHumanfaceService {

    @Autowired
    private TSSsHumanfaceDao tSSsHumanfaceDao;


    @Override
    public PageInfo queryPage(Map<String, Object> map)  {
        Integer pageSize = Integer.valueOf(map.get("pageSize").toString());
        Integer currentPage = Integer.valueOf(map.get("currentPage").toString());
        PageHelper.startPage(currentPage, pageSize);
        List<TSSsHumanfaceEntity> mapList = tSSsHumanfaceDao.queryPage(map);
        PageInfo<TSSsHumanfaceEntity> mapPageInfo = new PageInfo<>(mapList);
        return mapPageInfo;
    }

    @Override
    public int deleteTSSsHumanfaceById(Long id) {
        return tSSsHumanfaceDao.deleteTSSsHumanfaceById(id);
    }

    @Override
    public void updateById(TSSsHumanfaceEntity params) {
        tSSsHumanfaceDao.updateById(params);
    }

    @Override
    public void save(TSSsHumanfaceEntity params) {
        tSSsHumanfaceDao.save(params);
    }

    @Override
    public List<String> getThingsList() {
        return tSSsHumanfaceDao.getThingsList();
    }
}